package org.jivesoftware.smackx.packet;

import java.util.Date;
import org.jivesoftware.smack.util.StringUtils;

public class DelayInfo extends DelayInformation
{
  DelayInformation wrappedInfo;

  public DelayInfo(DelayInformation paramDelayInformation)
  {
    super(paramDelayInformation.getStamp());
    this.wrappedInfo = paramDelayInformation;
  }

  public String getFrom()
  {
    return this.wrappedInfo.getFrom();
  }

  public String getReason()
  {
    return this.wrappedInfo.getReason();
  }

  public Date getStamp()
  {
    return this.wrappedInfo.getStamp();
  }

  public void setFrom(String paramString)
  {
    this.wrappedInfo.setFrom(paramString);
  }

  public void setReason(String paramString)
  {
    this.wrappedInfo.setReason(paramString);
  }

  public String getElementName()
  {
    return "delay";
  }

  public String getNamespace()
  {
    return "urn:xmpp:delay";
  }

  public String toXML()
  {
    StringBuilder localStringBuilder = new StringBuilder();
    localStringBuilder.append("<").append(getElementName()).append(" xmlns=\"").append(getNamespace()).append("\"");
    localStringBuilder.append(" stamp=\"");
    localStringBuilder.append(StringUtils.formatXEP0082Date(getStamp()));
    localStringBuilder.append("\"");
    if ((getFrom() != null) && (getFrom().length() > 0))
      localStringBuilder.append(" from=\"").append(getFrom()).append("\"");
    localStringBuilder.append(">");
    if ((getReason() != null) && (getReason().length() > 0))
      localStringBuilder.append(getReason());
    localStringBuilder.append("</").append(getElementName()).append(">");
    return localStringBuilder.toString();
  }
}

/* Location:           D:\hygieia\userclient\common\libs\easemobchat_2.1.8.jar
 * Qualified Name:     org.jivesoftware.smackx.packet.DelayInfo
 * JD-Core Version:    0.6.1
 */